function A(){
    return new Promise((resolve,reject)=>{
        setTimeout(()=>{
            console.log('A')
            resolve()
        },1000)
    })
}
function B(){
    console.log('B')
}
async function foo(){ //*
    await A()  // yield A()
    B()
}
foo()